package com.chixing.day10.day10_Homew;


import java.util.Arrays;

public class Solution {
    public static boolean isSolution(String s, String t){
        if(s.equals(t) || s.length() != t.length()){
            return false;
        }
        char[] str1 = s.toCharArray();
        char[] str2 = t.toCharArray();
        Arrays.sort(str1);
        Arrays.sort(str2);
        return Arrays.equals(str1, str2);
    }

    public static void main(String[] args){
        String s = "anagram";
        String t = "nagaram";
        System.out.println(isSolution(s, t));
    }
}
